﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Normal.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Teamboard.Models.Project>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
            <% foreach (var proj in Model) { %>
                <div class="project">
                    <div class="head"><%: proj.Name %></div>
                    <% foreach (var conf in proj.Configurations)
                    { %>
                    
                        <% if (conf.Status == "SUCCESS")
                        {%>
                            <div class="conf green">
                        <%} else if (conf.Status == "ERROR" || conf.Status == "FAILURE")  {  %>
                            <div class="conf red">
                        <%} else if (conf.Status == "RUNNING")  {  %>
                            <div class="conf blue">
                        <%} else {  %>
                            <div class="conf yellow">
                        <%} %>                           
                            <%: conf.Name %><br />
                            <span class="buildNumber">
                                <%foreach (var buildNumber in conf.LatestBuildNumbers)
                                  {%>
                                    <%:buildNumber %>
                                  <%} %></span>
                        
                        </div>
                    
                <% } %>   
            </div>
    <% } %>
</asp:Content>
<%--
                        <% if (conf.Status == null) {%>
                                <img src="Content/img/sunny.png" style="height: 96px; margin-right: 20px" class="place-left"/>
                        <%} else {  %>
                                <img src="Content/img/error.png" style="height: 96px; margin-right: 20px" class="place-left"/>
                        <%} %>--%>

